from django.template import Library

from event.models import Event

register = Library()

@register.inclusion_tag("event/table/events.html")
def list_all_events():
  return {'event_list': Event.objects.all()}

@register.inclusion_tag("event/table/events.html")
def list_events(events):
  return {'event_list': events}

@register.inclusion_tag("event/table/tracks.html")
def list_tracks(event):
  return {'track_list': event.track_set.all()}


